{% extends 'curatorship/page.html' %}

{% block content %}
<form method="post" action=".">{% csrf_token %}
<input type="submit" value="Генерировать пароль" />
	<table>
		<thead>
			<td><input type="checkbox" onclick="if($(this).attr('checked')) $('input.pupil').attr('checked', 'true'); else $('input.pupil').attr('checked', '')" /></td>
			<td>Фамилия, имя</td>
			<td>Логин</td>
		</thead>
		{% for pupil in pupils %}
		<tr>
			<td><input type="checkbox" id="pupil-{{ pupil.id }}" class="pupil" name="pupil-{{ pupil.id }}" /></td>
			<td><label for="pupil-{{ pupil.id }}">{{ pupil.fi }}</label></td>
			<td>{{ pupil.username }}</td>
		</tr>
		{% endfor %}
	</table>
</form>
{% endblock %}